// 表格
.el-table {
  --el-table-border-color: #e1e3e6;
  --el-table-header-text-color: #73787f;
  --el-table-header-bg-color: #f7f7f9;
  --el-table-text-color: #3a3a3d;
  --el-table-row-hover-bg-color: #f7f7f9;
  width: 100%;
  border-style: solid;
  border-color: $border-color;
  border-width: 1px 1px 0 1px;
  border-radius: $border-radius-base;
  th {
    font-weight: $font-weight-light;
  }
  .el-table__empty-text {
    line-height: $line-height-text;
  }
  &.el-table--border {
    border: none;
    .el-table__body-wrapper {
      border-top: 1px solid $border-color;
    }
    th.el-table__cell {
      border-bottom: none;
    }
    .el-table__cell {
      border-right: none;
    }
  }
}
// 分页
.el-pagination {
  justify-content: flex-end;
  .el-pagination__total {
    color: $black;
  }
}
// 输入框
.el-input__inner::placeholder,
.el-textarea__inner::placeholder {
  color: $input-disabled-color;
}
// 按钮强制样式覆盖
.el-button .iconfont {
  font-size: $font-size-middle;
}
.el-button--small {
  --el-button-size: 28px;
}
.el-button:not(.is-text):not(.is-disabled):not(.el-button--primary):not(.el-button--danger):not(.el-button--success):not(.el-button--warning) {
  --el-button-text-color: #3a3a3d;
  --el-button-border-color: #bcbeda;
  &:hover,
  &:active,
  &:focus {
    background-color: $white;
    border-color: $border-color;
    color: $black;
  }
  &:focus-visible {
    outline: none;
  }
}
.el-button--default.is-text {
  padding: 0;
  height: auto;
  border: none;
}
.el-button--primary.is-text:not(.is-disabled) {
  color: $blue;
  &:hover,
  &:active,
  &:focus {
    color: $blue;
  }
}
.el-button--danger.is-text {
  color: $red;
  &:hover,
  &:active,
  &:focus {
    color: $red;
  }
}
.el-button--success.is-text {
  color: $green;
  &:hover,
  &:active,
  &:focus {
    color: $green;
  }
}
.el-button--primary.is-text.is-disabled,
.el-button--danger.is-text.is-disabled,
.el-button--success.is-text.is-disabled {
  color: $tip-color !important;
}
.el-button--primary:not(.is-text):not(.el-button--danger) {
  --el-button-disabled-text-color: #9ca3ac;
  --el-button-disabled-bg-color: #e4e7ed;
  --el-button-disabled-border-color: #e4e7ed;
  &:not(.is-plain):not(.is-disabled) {
    border-color: $blue;
    color: $white;
    &:hover,
    &:active,
    &:focus {
      background-color: $blue;
      border-color: $blue;
      color: $white;
    }
  }
}
.el-button--primary.is-plain {
  border-color: $blue;
  background-color: $white;
  color: $blue;
  &:hover,
  &:active,
  &:focus {
    color: $blue;
  }
  &.is-disabled,
  &.is-disabled:hover,
  &.is-disabled:active,
  &.is-disabled:focus {
    background-color: $button-disabled-bg;
    border-color: $light-blue;
    color: $tip-color;
  }
}
.el-button--success {
  border-color: $green;
  color: $white;
  &:hover,
  &:active,
  &:focus {
    background-color: $green;
    border-color: $green;
    color: $white;
  }
}
.el-button--success.is-plain {
  border-color: $green;
  background-color: $white;
  color: $green;
  &:hover,
  &:active,
  &:focus {
    color: $green;
  }
}
.el-button--warning {
  border-color: $orange;
  color: $white;
  &:hover,
  &:active,
  &:focus {
    background-color: $orange;
    border-color: $orange;
    color: $white;
  }
}
.el-button--warning.is-plain {
  border-color: $orange;
  background-color: $white;
  color: $orange;
  &:hover,
  &:active,
  &:focus {
    color: $orange;
  }
}
.el-button--danger {
  border-color: $red;
  color: $white;
  &:hover,
  &:active,
  &:focus {
    background-color: $red;
    border-color: $red;
    color: $white;
  }
}
.el-button--danger.is-plain {
  border-color: $red;
  background-color: $white;
  color: $red;
  &:hover,
  &:active,
  &:focus {
    color: $red;
  }
}
.is-text {
  background-color: transparent !important;
}
// 表单强制样式覆盖
.el-form-item {
  &:last-child {
    margin-bottom: 0;
  }
}
.el-form-item__label {
  color: $black;
}
.el-form-item--default {
  margin-bottom: 15px;
}
.el-form--label-top {
  .el-form-item__error {
    left: auto;
    right: 0;
    top: -22px;
    padding-top: 0;
  }
}
// 单选强制样式覆盖
.el-radio-group {
  .el-radio-button__inner {
    padding: 8px;
  }
  .el-radio {
    color: $black;
    margin-right: 12px;
  }
}
// 数字强制样式覆盖
.el-input-number {
  width: 165px;
}
// 多选强制样式覆盖
.el-checkbox {
  color: $black;
  margin-right: 20px;
  .el-checkbox__label {
    padding-left: 6px;
  }
}
// 滑块强制样式覆盖
.el-slider__button.dragging,
.el-slider__button.hover,
.el-slider__button:hover {
  transform: scale(1);
}
.el-slider {
  --el-slider-button-size: 12px;
  &.is-vertical {
    display: inline-block;
  }
}
// 悬浮窗强制样式覆盖
.el-popper {
  box-shadow: var(--el-box-shadow-light); // 很奇怪，有些地方没有el-popover，阴影手动设置
  &.el-popover {
    min-width: auto;
    &.is-dark {
      border: none;
    }
  }
}
// 通知强制样式覆盖
.el-message-box {
  &__header {
    padding: 16px 24px;
    font-size: $font-size-middle;
  }
  &__content {
    padding: 0 24px;
    color: $black;
  }
  &__btns {
    padding: 20px 24px 6px;
  }
}
// 菜单强制样式覆盖
.el-dropdown-menu__item:not(.is-disabled):focus {
  background-color: $gray-200;
  color: $black;
}
// 颜色选择器强制样式覆盖
.el-color-predefine__color-selector {
  width: 17px;
  height: 17px;
  margin: 0 6px 6px 0;
}
// 进度强制样式覆盖
.el-progress {
  .el-progress-bar .el-progress-bar__outer {
    height: 8px !important;
    background-color: $gray-300;
  }
  .el-progress__text {
    margin-left: 8px;
    color: $gray-700;
  }
}

// 消息强制样式覆盖
.el-message {
  z-index: 9999999999 !important;
  .el-message__icon {
    margin-top: 4px;
  }
  .el-message__content {
    line-height: 1.5;
  }
}
// 树表单强制样式覆盖
.el-tree-node__content {
  margin-bottom: 0 !important;
}
// 缺省图
.el-empty {
  --el-empty-description-margin-top: 8px;
  .el-empty__description p {
    color: $gray-700;
  }
}
// 卡片强制样式覆盖
.el-tabs {
  border: none;
  &.el-tabs--border-card,
  &.el-tabs--card {
    & > .el-tabs__header {
      border-bottom: none;
      .el-tabs__nav {
        padding: 4px;
        border-radius: $border-radius-base;
      }
      .el-tabs__item {
        height: 30px;
        padding: 5px 20px;
        border-right: none;
        border-left: none;
        font-weight: $font-weight-light;
        &:not(.is-active) {
          color: $gray-700;
        }
        &.is-active {
          background-color: $white;
          font-weight: $font-weight-normal;
          color: $black;
          border-radius: $border-radius-base;
          box-shadow: 0px 2px 6px 0px rgba(20, 20, 26, 0.08);
        }
      }
    }
  }
  &.el-tabs--border-card {
    background-color: $body-bg;
    & > .el-tabs__header {
      margin-bottom: 12px;
      background-color: $body-bg;
      .el-tabs__nav {
        background-color: $gray-300;
      }
    }
    & > .el-tabs__content {
      background-color: $white;
      border-radius: $border-radius-base;
      padding: 20px;
    }
  }
  &.el-tabs--card {
    & > .el-tabs__header {
      .el-tabs__nav {
        border: none;
        background-color: $gray-100;
      }
    }
  }
}
